﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace _081.异常筛选器
{
    public class LogExceptionFilter : IAsyncExceptionFilter
    {
        public Task OnExceptionAsync(ExceptionContext context)
        {
            return File.AppendAllTextAsync("d:/error.log",context.Exception.ToString());
        }
    }
}
